<!--
 *@开发者: 刘翔
 *@创建时间: 2024-04-28 11:52:21
 *@描述:超支排名第4科室-病组分布
!-->
<template>
  <div class="page-tile-15-18">
    <div class="page-tile-15-18-top">
      <formList topHeightValue="30%" bottomHeightValue="70%" :formParameter="formParameter" :data_list="data_list" />
    </div>
    <div class="page-tile-15-18-center">
      <formList topHeightValue="15%" bottomHeightValue="85%" :formParameter="formParameter2" :data_list="data_list2" />
    </div>
    <div class="page-tile-15-18-bottom">
      <span v-html="card1.text1"></span>
    </div>
  </div>
</template>

<script>
import formList from '../components/formList/formList';

export default {
  // 组件名称
  name: 'pageTile15_18',
  // 组件参数 接收来自父组件的数据
  props: {},
  // 局部注册的组件
  components: {
    formList,
  },
  // 组件状态值
  data() {
    return {
      card1: {},
      data_list: [],
      data_list2: [],
      formParameter: [
        { width: '5%', title: '科室' },
        { width: '5%', title: 'CMI' },
        { width: '10%', title: '病例数' },
        { width: '12%', title: '例均医保拨付费用' },
        { width: '10%', title: '本院例均费用' },
        { width: '10%', title: '例均盈亏' },
        { width: '10%', title: '平均住院日' },
        { width: '10%', title: '药品费占比' },
        { width: '8%', title: '材料费占比' },
        { width: '10%', title: '合计盈亏(万元)', highlightValue: '合计盈亏(万元)是否标红' },
        { width: '10%', title: '病例数最多病组', fontSizeContent: '1rem' },
      ],
      formParameter2: [
        { width: '5%', title: 'DRG分组' },
        { width: '20%', title: 'DRG名称', fontSizeContent: '1rem' },
        { width: '5%', title: 'CMI' },
        { width: '5%', title: '低倍率占比(%)' },
        { width: '8%', title: '例均医保拨付费用' },
        { width: '8%', title: '例均盈亏' },
        { width: '5%', title: '平均住院日' },
        { width: '7%', title: '本院例均费用(万元)' },
        { width: '7%', title: '病例数' },
        { width: '10%', title: '地区均费' },
        { width: '5%', title: '药品费占比' },
        { width: '5%', title: '材料费占比' },
        { width: '5%', title: '高倍率占比(%)' },
        { width: '5%', title: '合计盈亏(万元)', highlightValue: '合计盈亏(万元)是否标红' },
      ],
    };
  },
  // 计算属性
  computed: {},
  // 侦听器
  watch: {},
  // 组件方法
  methods: {
    init(data) {
      this.data_list = [data.data_list];
      this.data_list.forEach(item => {
        if (item['合计盈亏(万元)']) item['合计盈亏(万元)是否标红'] = item['合计盈亏(万元)'] < 0 ? true : false;
      });
      this.data_list2 = data.data_list2;
      this.data_list2.forEach(item => {
        if (item['合计盈亏(万元)']) item['合计盈亏(万元)是否标红'] = item['合计盈亏(万元)'] < 0 ? true : false;
      });
      //内容
      this.cardData(data.desc);
    },
    //卡片内容
    cardData(desc) {
      this.card1 = {
        text1: desc,
      };
    },
  },
  created() {},
  mounted() {},
};
</script>

<style lang="less" scoped>
.page-tile-15-18 {
  height: 100%;
  .page-tile-15-18-top {
    margin-bottom: 20px;
    height: 22%;
  }
  .page-tile-15-18-center {
    margin-bottom: 30px;
    height: 60%;
  }
  .page-tile-15-18-bottom {
    margin: 0 20px;
    padding: 2%;
    display: flex;
    align-items: center;
    height: 12%;
    font-size: 1.7rem;
    line-height: 40px;
    background: #fff2ca;
    border-radius: 16px;
    border: 1px solid #000;
  }
}
</style>
